/**
 * @param {*} dom 选定的li的className
 * @param {*} value 设置选定的值
 */
function setOption(dom, value) {
  var arr = document.getElementsByClassName(dom);
  var value = document.getElementById(value);
  for (var i = 0; i < arr.length; i++) {
    arr[i].index = i
    arr[i].onclick = function() {
      value.innerHTML = arr[this.index].innerHTML;
    };
  }
}
